{% extends "myadmin/base.html" %} {% block mainbody %}
<h3>商品类别管理</h3>
<table class="table table-bordered table-striped">
    <thead>
        <tr>
            <th>
                id
            </th>
            <th>
                类别名称
            </th>
            <th>
                父类别id
            </th>
            <th>
                路径Path
            </th>
            <th>
                操作
            </th>
        </tr>
    </thead>
    <tbody>
        {% for type in typeList %}
        <tr>
            <td>
                {{type.id}}
            </td>
            <td>
                {{type.name}}
            </td>
            <td>
                {{type.pid}}
            </td>
            <td>
                {{type.path}}
            </td>
            <td>
                <a href="{% url 'myadmin_type_add' type.id %}" class="view-link">添加子类</a>
                <a href="{% url 'myadmin_type_edit' type.id %}" class="view-link">编辑</a>
                <a href="{% url 'myadmin_type_del' type.id %}" class="view-link">删除</a>
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>
<div class="span9">
    <div class="pagination span8" style="margin-top: 0;text-align: right;">
        <ul>
            <li style="">
                <a href="#">共{{pageCount}}页</a>
            </li>
            {% for i in plist %}
            <li>
                <a href="{% url 'myadmin_type_index' i %} " ">{{i}}</a>
            </li>
            {% endfor %}
        </ul>
    </div>
</div>
{% endblock %}